﻿using System;
using WPFExcelReport;
using System.ServiceProcess;
namespace ITXLMSVC
{
    static class Program
    {
       
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            string configFilePath = GetAppPath() + "\\log4netlm.config";
            log4net.Config.DOMConfigurator.ConfigureAndWatch
            (new System.IO.FileInfo(configFilePath)); 
            ServiceBase[] ServicesToRun;
            // Change the following line to match.
            ServicesToRun = new ServiceBase[] { new ITXLMSVC() };
            ServiceBase.Run(ServicesToRun);
           
        }
        public static string GetAppPath()
        {
            string myPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            int i = myPath.LastIndexOf('\\');
            return myPath.Remove(i + 1);
        }
    }
}
